package gewu.suleju.sevice.imp;

import gewu.suleju.dao.iml.IRenterReservationDao;
import gewu.suleju.model.pojo.RenterReservation;
import gewu.suleju.sevice.IRenterReservationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class RenterReservationServiceImp implements IRenterReservationService {
    @Autowired
    private IRenterReservationDao iRenterReservationDao;
    @Override
    public void save(RenterReservation renterReservation) {
        iRenterReservationDao.save(renterReservation);
    }

    @Override
    public RenterReservation findByUserIdAndHouseInforId(Integer userId, Integer houseId) {

        return iRenterReservationDao.findByUserIdAndHouseInforId(userId,houseId);
    }

    @Override
    public void updateStatus(Integer id) {
        iRenterReservationDao.updateStatus(id);
    }
    @Override
    public ArrayList<RenterReservation> findByIsStatus(Integer id) {
        return iRenterReservationDao.findByIsStatus(id);
    }

    @Override
    public void updateStatus1(Integer id) {
        iRenterReservationDao.updateStatus1(id);
    }

}
